﻿<Window x:Class="Bricks.MiuiThemeMaker.MiuiThemeMaker.LoginWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converter="clr-namespace:Bricks.MiuiThemeMaker.BaseFramework.Converters;assembly=BaseFramework"
        Style="{StaticResource HiddenShowWindow}"
        Title="登录" Height="320" Width="675" ResizeMode="CanMinimize" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <converter:TrueToFalseConverter x:Key="trueToFalseConverter" />
    </Window.Resources>
    <Border BorderThickness="5" BorderBrush="DarkOrange" Background="White">
        <Grid Name="gridTop" Margin="0,0,20,0" Background="White" MouseLeftButtonDown="gridTop_MouseLeftButtonDown">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="400" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Image Name="image1" Stretch="Uniform" Source="/MiuiThemeMaker;component/Images/xmsale_loginBg.gif" VerticalAlignment="Bottom" />
            <Image Name="image2" Source="/MiuiThemeMaker;component/Images/MiuiLogo.png" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform" Height="61" Width="199" />
            <Grid Grid.Column="1" Name="grid1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="2*" />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock Name="textBlock1" Text="登录->创意无处不在" Grid.ColumnSpan="2" Foreground="DarkOrange" FontSize="26" FontWeight="Bold" HorizontalAlignment="Center">
                    <TextBlock.Effect>
                    <DropShadowEffect Color="LightGray" />
                </TextBlock.Effect>
                </TextBlock>
                <TextBlock Grid.Row="1" Name="textBlock2" Text="账  号：" HorizontalAlignment="Right" FontWeight="Normal" FontSize="14" />
                <TextBox Grid.Column="1" Grid.Row="1" Name="txtUsername" />
                <TextBlock Grid.Row="2" Text="密  码：" HorizontalAlignment="Right" FontWeight="Normal" FontSize="14" />
                <PasswordBox Grid.Column="1" Grid.Row="2" Name="txtPassword" />
                <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Right">
                    <CheckBox Content="在线编辑" Name="cbOnlineEdit" VerticalAlignment="Center" IsChecked="True" ToolTip="连接在线数据库，通过小米服务器认证" />
                    <CheckBox Content="本地编辑" Name="cnLocalEdit" VerticalAlignment="Center" Margin="20,0,0,0" ToolTip="连接本地数据库，通过本地数据库认证" IsChecked="{Binding ElementName=cbOnlineEdit,Path=IsChecked,Converter={StaticResource trueToFalseConverter}}" />
                </StackPanel>
                <StackPanel Grid.ColumnSpan="2" Grid.Row="4" Name="stackPanel1" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button Content="登录" Name="btnLogin" Click="btnLogin_Click" IsDefault="True" />
                    <Button Content="重置" Name="btnReset" Click="btnReset_Click" />
                    <Button Content="关闭" Name="btnClose" Click="btnClose_Click" />
                </StackPanel>
                <TextBlock Grid.Row="5" Name="textBlock4" Text="你还不是小米用户？立刻免费注册" Grid.ColumnSpan="2" HorizontalAlignment="Right" />
            </Grid>
        </Grid>
    </Border>
</Window>
